Optimal. Leaf size=52 \[ -\frac {a^3 x^{-3 n}}{3 n}-\frac {3 a^2 b x^{-2 n}}{2 n}-\frac {3 a b^2 x^{-n}}{n}+b^3 \log (x) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 52, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.118, Rules used = {272, 45}
\begin {gather*} -\frac {a^3 x^{-3 n}}{3 n}-\frac {3 a^2 b x^{-2 n}}{2 n}-\frac {3 a b^2 x^{-n}}{n}+b^3 \log (x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 45
Rule 272
Rubi steps
\begin {align*} \int x^{-1-3 n} \left (a+b x^n\right )^3 \, dx &=\frac {\text {Subst}\left (\int \frac {(a+b x)^3}{x^4} \, dx,x,x^n\right )}{n}\\ &=\frac {\text {Subst}\left (\int \left (\frac {a^3}{x^4}+\frac {3 a^2 b}{x^3}+\frac {3 a b^2}{x^2}+\frac {b^3}{x}\right ) \, dx,x,x^n\right )}{n}\\ &=-\frac {a^3 x^{-3 n}}{3 n}-\frac {3 a^2 b x^{-2 n}}{2 n}-\frac {3 a b^2 x^{-n}}{n}+b^3 \log (x)\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.04, size = 48, normalized size = 0.92 \begin {gather*} -\frac {a x^{-3 n} \left (2 a^2+9 a b x^n+18 b^2 x^{2 n}\right )}{6 n}+\frac {b^3 \log \left (x^n\right )}{n} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.24, size = 49, normalized size = 0.94
method | result | size |
risch | \(b^{3} \ln \left (x \right )-\frac {3 a \,b^{2} x^{-n}}{n}-\frac {3 a^{2} b \,x^{-2 n}}{2 n}-\frac {a^{3} x^{-3 n}}{3 n}\) | \(49\) |
norman | \(\left (b^{3} \ln \left (x \right ) {\mathrm e}^{3 n \ln \left (x \right )}-\frac {a^{3}}{3 n}-\frac {3 a \,b^{2} {\mathrm e}^{2 n \ln \left (x \right )}}{n}-\frac {3 a^{2} b \,{\mathrm e}^{n \ln \left (x \right )}}{2 n}\right ) {\mathrm e}^{-3 n \ln \left (x \right )}\) | \(61\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.30, size = 52, normalized size = 1.00 \begin {gather*} b^{3} \log \left (x\right ) - \frac {a^{3}}{3 \, n x^{3 \, n}} - \frac {3 \, a^{2} b}{2 \, n x^{2 \, n}} - \frac {3 \, a b^{2}}{n x^{n}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.40, size = 51, normalized size = 0.98 \begin {gather*} \frac {6 \, b^{3} n x^{3 \, n} \log \left (x\right ) - 18 \, a b^{2} x^{2 \, n} - 9 \, a^{2} b x^{n} - 2 \, a^{3}}{6 \, n x^{3 \, n}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 318 vs.
\(2 (44) = 88\).
time = 14.87, size = 318, normalized size = 6.12 \begin {gather*} \begin {cases} a^{3} x + \frac {9 a^{2} b x^{\frac {2}{3}}}{2} + 9 a b^{2} \sqrt [3]{x} + b^{3} \log {\left (x \right )} & \text {for}\: n = - \frac {1}{3} \\\left (a + b\right )^{3} \log {\left (x \right )} & \text {for}\: n = 0 \\- \frac {6 a^{3} n}{18 n^{2} x^{3 n} + 6 n x^{3 n}} - \frac {2 a^{3}}{18 n^{2} x^{3 n} + 6 n x^{3 n}} - \frac {27 a^{2} b n x^{n}}{18 n^{2} x^{3 n} + 6 n x^{3 n}} - \frac {9 a^{2} b x^{n}}{18 n^{2} x^{3 n} + 6 n x^{3 n}} - \frac {54 a b^{2} n x^{2 n}}{18 n^{2} x^{3 n} + 6 n x^{3 n}} - \frac {18 a b^{2} x^{2 n}}{18 n^{2} x^{3 n} + 6 n x^{3 n}} + \frac {18 b^{3} n x^{3 n} \log {\left (x^{n} \right )}}{18 n^{2} x^{3 n} + 6 n x^{3 n}} + \frac {6 b^{3} n x^{3 n}}{18 n^{2} x^{3 n} + 6 n x^{3 n}} + \frac {6 b^{3} x^{3 n} \log {\left (x^{n} \right )}}{18 n^{2} x^{3 n} + 6 n x^{3 n}} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 1.59, size = 51, normalized size = 0.98 \begin {gather*} \frac {6 \, b^{3} n x^{3 \, n} \log \left (x\right ) - 18 \, a b^{2} x^{2 \, n} - 9 \, a^{2} b x^{n} - 2 \, a^{3}}{6 \, n x^{3 \, n}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.34, size = 52, normalized size = 1.00 \begin {gather*} b^3\,\ln \left (x\right )-\frac {a^3}{3\,n\,x^{3\,n}}-\frac {3\,a\,b^2}{n\,x^n}-\frac {3\,a^2\,b}{2\,n\,x^{2\,n}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________